package kuzha.ast;

public class Variable extends Primitive {
	public final String name;
	public final boolean withCall;
	
	public Variable(String name, boolean withCall) {
		if (name == null)
			throw new IllegalArgumentException();
		this.name = name;
		this.withCall = withCall;
	}
	
	@Override
	public void accept(AstVisitor visitor) {
		visitor.visit(this);
	}
	@Override
	public <A, R> R accept(AstVisitor2<A, R> visitor, A object) {
		return visitor.visit(this, object);
	}

	@Override
	public String toString() {
		return name;
	}
}
